package com.ysh.contentcenter.configuration;

import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.context.annotation.Configuration;
import ribbonconfiguration.RibbonConfiguration;
// 使用java代码来配置ribbon的规则
// RibbonConfiguration需要@Configuration 但不能为重复扫描，防止父子上下文，所以RibbonConfiguration配置在ContentCenterApplication包之外
// 如果不这样会出现这个规则变为全局的规则，不管是哪个服务都会用到这个规则

// 单独对user-center实列
//@Configuration
//@RibbonClient(name="user-center",configuration = RibbonConfiguration.class)

// 全局配置
@Configuration
@RibbonClients(defaultConfiguration = RibbonConfiguration.class)
public class UserCenterRibbonConfiguration {

}
